package cn.shop.dys;

import android.content.Context;

/**
 * Created by sen on 2016/4/25 0025.
 */
public class MyCrashHandler implements Thread.UncaughtExceptionHandler {

    public static MyCrashHandler myCrashHandler;

    private MyCrashHandler() {
    }

    public static synchronized MyCrashHandler
    getInstance() {
        if (myCrashHandler != null) {
            return myCrashHandler;
        } else {
            myCrashHandler = new MyCrashHandler();
            return myCrashHandler;
        }
    }


    @Override
    public void uncaughtException(Thread thread, Throwable ex) {
            ex.printStackTrace();
    }
}
